From: Ian Campbell Date: Tue, 22 Sep 2015 11:40:51 +0000 (+0100) Subject: tools/libs/call: Avoid xc_memalign in netbsd and solaris backends X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1878 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bf8f8fdeb4195badf2ebb9049825ea9da200d447;p=xen.git tools/libs/call: Avoid xc_memalign in netbsd and solaris backends These are already arch specific, so just use the appropriate interfaces (as determined by looking at the xc_memalign backend). Signed-off-by: Ian Campbell Acked-by: Wei Liu --- diff --git a/tools/libs/call/netbsd.c b/tools/libs/call/netbsd.c index 2aa02f14a8..e96fbf16f7 100644 --- a/tools/libs/call/netbsd.c +++ b/tools/libs/call/netbsd.c @@ -74,8 +74,8 @@ void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages) size_t size = npages * XC_PAGE_SIZE; void *p; - p = xc_memalign(xcall, XC_PAGE_SIZE, size); - if (!p) + ret = posix_memalign(&p, XC_PAGE_SIZE, size); + if ( ret != 0 || !p ) return NULL; if ( mlock(p, size) < 0 ) diff --git a/tools/libs/call/solaris.c b/tools/libs/call/solaris.c index 945d8673ac..5aa330e4eb 100644 --- a/tools/libs/call/solaris.c +++ b/tools/libs/call/solaris.c @@ -71,7 +71,7 @@ int osdep_xencall_close(xencall_handle *xcall) void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages) { - return xc_memalign(xcall, XC_PAGE_SIZE, npages * XC_PAGE_SIZE); + return memalign(XC_PAGE_SIZE, npages * XC_PAGE_SIZE); } void osdep_free_hypercall_buffer(xencall_handle *xcall, void *ptr,